home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / RasMol / Source / pixutils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-13  |  2.6 KB  |  90 lines

  1. /* pixutils.h
  2.  * RasMol2 Molecular Graphics
  3.  * Roger Sayle, August 1995
  4.  * Version 2.6
  5.  */
  6.  
  7. typedef struct {
  8.         int px, py, pz;      /* Spline Control Co-ordinate */
  9.         int tx, ty, tz;      /* Spline Direction Vector    */
  10.         int hnx, hny, hnz;   /* Horizontal Normal Vector   */
  11.         int vnx, vny, vnz;   /* Vertical Normal Vector     */
  12.         int hx, hy, hz;      /* Ribbon Height Vector       */
  13.         int wx, wy, wz;      /* Ribbon Width Vector        */
  14.         char hinten;         /* Horizontal Intensity       */
  15.         char vinten;         /* Vertical Intensity         */
  16.         short hsize;         /* Horizontal Vector Length   */
  17.         short vsize;         /* Vertical Vector Length     */
  18.         short wide;          /* Ribbon Width               */
  19.     } Knot;
  20.  
  21. typedef struct {
  22.         Pixel __huge *fbuf;
  23.         short __huge *dbuf;
  24.         int xmax, ymax;
  25.         int yskip;
  26.     } ViewStruct;
  27.  
  28. #define ZValid(z)     ((!UseSlabPlane) || ((z)<SlabValue))
  29. #define XValid(x)     (((x)>=0)&&((x)<View.xmax))
  30. #define YValid(y)     (((y)>=0)&&((y)<View.ymax))
  31.  
  32.  
  33. #ifdef PIXUTILS
  34. ViewStruct View;
  35. int SplineCount;
  36. int FontSize;
  37.  
  38. #else
  39. extern ViewStruct View;
  40. extern int SplineCount;
  41. extern int FontSize;
  42.  
  43. #ifdef FUNCPROTO
  44. void PlotDeepPoint( int, int, int, int );
  45. void ClipDeepPoint( int, int, int, int );
  46. void DrawTwinLine( int, int, int, int, int, int, int, int );
  47. void ClipTwinLine( int, int, int, int, int, int, int, int );
  48. void DrawTwinVector( int, int, int, int, int, int, int, int );
  49. void ClipTwinVector( int, int, int, int, int, int, int, int );
  50. void ClipDashVector( int, int, int, int, int, int, int, int );
  51.  
  52. void DrawCylinder( int, int, int, int, int, int, int, int, int );
  53. void ClipCylinder( int, int, int, int, int, int, int, int, int );
  54. void DashRibbon( Knot __far*, Knot __far*, int, int );
  55. void StrandRibbon( Knot __far*, Knot __far*, int, int );
  56. void SolidRibbon( Knot __far*, Knot __far*, int );
  57. void RectRibbon( Knot __far*, Knot __far*, int );
  58. void DrawSphere( int, int, int, int, int );
  59. void ClipSphere( int, int, int, int, int );
  60.  
  61. void SetFontSize( int );
  62. void DisplayString( int, int, int, char*, int );
  63. void InitialisePixUtils();
  64.  
  65. #else /* non-ANSI C compiler */
  66. void PlotDeepPoint();
  67. void ClipDeepPoint();
  68. void DrawTwinLine();
  69. void ClipTwinLine();
  70. void DrawTwinVector();
  71. void ClipTwinVector();
  72. void ClipDashVector();
  73.  
  74. void DrawCylinder();
  75. void ClipCylinder();
  76. void DashRibbon();
  77. void StrandRibbon();
  78. void SolidRibbon();
  79. void RectRibbon();
  80. void DrawSphere();
  81. void ClipSphere();
  82.  
  83. void SetFontSize();
  84. void DisplayString();
  85. void InitialisePixUtils();
  86.  
  87. #endif
  88. #endif
  89.  
  90.